<template>
  <div v-if="show" class="global-loading">
    <div class="spinner"></div>
  </div>
</template>

<script setup>
import { defineProps } from 'vue'
defineProps({ show: Boolean })
</script>

<style scoped>
.global-loading {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #409eff;
  border-top: 6px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
</style> 